package com.leo.erp.service;

import javax.servlet.http.HttpServletRequest;

import com.leo.erp.dto.DepotExecution;

public interface DepotService {
	
	/**
	 * 根据条件查询信息
	 * @param name
	 * @param type
	 * @param remark
	 * @param offset
	 * @param rows
	 * @return
	 */
	DepotExecution select(String name, Integer type, String remark, int currentPage, int pageSize);
	
	/**
	 * 设置默认
	 * @param isDefault
	 * @param depotID
	 * @return
	 */
	DepotExecution updateDepotIsDefault(int isDefault, int depotId);
	
	/**
	 * 强制删除
	 * @param idList
	 * @return
	 */
	int batchDeleteDepotByIds(String ids);
	
	/**
	 * 正常删除，要考虑数据完整性，进行完整性校验
	 * @param ids
	 * @return
	 */
	DepotExecution batchDeleteDepotByIdsNormal(String ids);
	
	/**
	 * 获取部门列表
	 * @return
	 */
	DepotExecution getAllList();
	
	/**
	 * 插入
	 * @param beanJson
	 * @param request
	 * @return
	 */
	DepotExecution insertDepot(String beanJson, HttpServletRequest request);
	
	/**
	 * 修改仓库信息
	 * @param beanJson
	 * @param depotId
	 * @param request
	 * @return
	 */
	DepotExecution updateDepot(String beanJson, int depotId, HttpServletRequest request);
	
	/**
	 * 查询名称是否存在
	 * @param id
	 * @param name
	 * @return
	 */
	DepotExecution checkIsNameExist(int id, String name);
	
	/**
	 * 查询用户部门信息
	 * @return
	 */
	DepotExecution findUserDepot();
}
